<template>
	<view class="newsnav">
		<view v-if="title" class="text">
		{{title}}
		<navigator v-if="page" :url="page" open-type="redirect" class="iconfont lefticon" :class="icon_left"></navigator>
		<text v-else class="lefticon" @click="back">
			<text v-if="icon_left" class="iconfont" :class="icon_left"></text>
		</text>
		</view>
	</view>
</template>

<script>
	export default {
		name:"NewsNav",
		data() {
			return {
				
			};
		},
		props: ['title','icon_left','page'],
		props: {
			title: {},
			icon_left: {},
			page: {
				default: ''
			}
		},
		methods: {
			back() {
				uni.navigateBack()
			}
		},
		mounted() {
		}
	}
</script>

<style lang="scss">
	.newsnav {
		color: #FFFFFF;
		width: 100%;
		padding-top: 45px;
		height: 40px;
		line-height: 40px;
		font-size: 18px;
		font-weight: 600;
		text-align: center;
		.text {
			position: relative;
			.lefticon {
				position: absolute;
				left: 20px;
				font-size: 16px;
				top: 0;
			}
		}
	}
</style>
